home *** CD-ROM | disk | FTP | other *** search
- property ancestor, PchangeUp, PchangeHor, PpixCounter, Ppix, PmySprite, Pjump, Pdelay
- global GgrenadeSprite, GbulletOffset, gScreenObjectList, Gscore1
-
- on birth me, whichSprite
- set ancestor to birth(script "animateObjects", GbulletOffset)
- set Pdelay to the ticks + 3
- set height to the locV of sprite whichSprite - 50
- set Pjump to (350 + height) / 10
- set PchangeUp to height / Pjump
- set PchangeHor to (the locH of sprite whichSprite - 320) / 10
- set PpixCounter to 1
- set Ppix to [201, 202, 203, 204, 205, 206, 207, 208, 209, 200, 201, 202]
- set PmySprite to GbulletOffset
- set the memberNum of sprite PmySprite to 201
- set the locH of sprite PmySprite to the locH of sprite whichSprite
- set the locV of sprite PmySprite to the locV of sprite whichSprite - 50
- return me
- end
-
- on move me
- if the ticks > Pdelay then
- set the memberNum of sprite PmySprite to getAt(Ppix, PpixCounter)
- if PpixCounter = (PchangeUp + 1) then
- set Pjump to -Pjump
- end if
- set the locH of sprite PmySprite to the locH of sprite PmySprite - PchangeHor
- set the locV of sprite PmySprite to the locV of sprite PmySprite - Pjump
- set PpixCounter to PpixCounter + 1
- if PpixCounter = 12 then
- explode()
- set the locH of sprite PmySprite to -500
- deleteProp(gScreenObjectList, PmySprite)
- set GbulletOffset to GbulletOffset - 1
- end if
- set Pdelay to the ticks + 3
- end if
- end
-
- on explode
- puppetSound("grex")
- puppetSprite(4, 1)
- repeat with x = 7 to 14
- puppetSprite(x, 1)
- end repeat
- repeat with x = 1 to 4
- set the locH of sprite 4 to the locH of sprite 4 + 4
- repeat with y = 7 to 14
- set the locH of sprite y to the locH of sprite y + 4
- end repeat
- updateStage()
- wait(2)
- set the locH of sprite 4 to the locH of sprite 4 - 4
- repeat with y = 7 to 14
- set the locH of sprite y to the locH of sprite y - 4
- end repeat
- updateStage()
- wait(2)
- end repeat
- puppetSprite(4, 0)
- repeat with x = 7 to 14
- puppetSprite(x, 0)
- end repeat
- set Gscore1 to Gscore1 - 40
- end
-